<div class="row">
  <div class="col-xs-12">
    <form method="post" class="form-horizontal" name="<{$controller}>_<{$action}>_form"
			id="<{$controller}>_<{$action}>_form" action="/Admin/users/save/id/<{if isset($data)}><{$data->id}><{/if}>">
      <div class="form-group">
        <label class="col-sm-3 control-label no-padding-right"
					for="form-field-1">管理角色组</label>
        <div class="col-sm-9">
          <select class="chosen-select" name="groupid" data-placeholder="选择一个分组">
            <{foreach from=$groups item=g}> 
            <option value="<{$g->gid}>" <{if isset($data)}><{if $data->groupid  eq $g->id}>selected<{/if}><{/if}> ><{$g->gname}>
            </option>
            <{/foreach}>
          </select>
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-3 control-label no-padding-right"
					for="form-field-2"> 用户名 </label>
        <{if isset($data)}>
        <div class="col-sm-9"><{$data->username}></div>
        <{else}>
        <div class="col-sm-9">
          <input type="text" value="" id="form-field-2"
						placeholder="" name="username" class="col-xs-10 col-sm-5" />
          <span
						class="help-inline col-xs-12 col-sm-7"> </span> </div>
        <{/if}> </div>
      <div class="form-group">
        <label class="col-sm-3 control-label no-padding-right"
					for="form-field-2"> 真实姓名 </label>
        <div class="col-sm-9">
          <input type="text" value="<{if isset($data)}><{$data->truename}><{/if}>" id="form-field-2"
						placeholder="" name="truename" class="col-xs-10 col-sm-5" />
          <span
						class="help-inline col-xs-12 col-sm-7"> </span> </div>
      </div>
      <div class="form-group">
        <label class="col-sm-3 control-label no-padding-right"
					for="form-field-2"> 密码 </label>
        <div class="col-sm-9">
          <input type="password" id="form-field-2" placeholder=" "
						name="password" class="col-xs-10 col-sm-5" />
          <span
						class="help-inline col-xs-12 col-sm-7"> </span> </div>
      </div>
      <div class="form-group">
        <label class="col-sm-3 control-label no-padding-right"
					for="form-field-2"> 邮箱 </label>
        <div class="col-sm-9">
          <input type="text" id="form-field-2" placeholder=" "
						value="<{if isset($data)}><{$data->email}><{/if}>" name="email" class="col-xs-10 col-sm-5" />
          <span class="help-inline col-xs-12 col-sm-7"> </span> </div>
      </div>
      <div class="form-group">
        <label class="col-sm-3 control-label no-padding-right"
					for="form-field-2"> 手机号码 </label>
        <div class="col-sm-9">
          <input type="text" id="form-field-2" placeholder=" "
						value="<{if isset($data)}><{$data->phone}><{/if}>" name="phone" class="col-xs-10 col-sm-5" />
          <span class="help-inline col-xs-12 col-sm-7"> </span> </div>
      </div>
      <div class="form-group">
        <label class="col-sm-3 control-label no-padding-right"
					for="form-field-2"> 状态 </label>
        <div class="col-sm-9">
          <label> <input name="status" type="radio" class="ace" <{if isset($data)}><{if $data->status  eq 1 }>checked="checked"<{/if}><{/if}> value="1" /> <span
						class="lbl">启用</span> </label>
          <label> <input name="status" type="radio" class="ace" <{if isset($data)}><{if $data->status  eq 0 }>checked="checked"<{/if}><{/if}> value="0" /> <span
						class="lbl">禁用</span> </label>
        </div>
      </div>
    </form>
  </div>
</div>
<script type="text/javascript">
	$(".chosen-select").chosen();
	$('.chosen-container').each(function() {
		$(this).find('a:first-child').css('width', '210px');
		$(this).find('.chosen-drop').css('width', '210px');
		$(this).find('.chosen-search input').css('width', '200px');
	});
</script> 